<!-- eslint-disable vue/multi-word-component-names -->
<template>
  <nav class="mui-bar mui-bar-tab">
          <router-link class="mui-tab-item-lib" to="/real">
            <span class="mui-icon"><i class="el-icon-s-home"></i></span>
            <span class="mui-tab-label">首页</span>
          </router-link>
          <router-link class="mui-tab-item-lib" to="/classify">
            <span class="mui-icon"><i class="el-icon-menu"></i></span>
            <span class="mui-tab-label">分类</span>
          </router-link>
          <router-link class="mui-tab-item-lib" to="/discovery">
            <span class="mui-icon"><i class="el-icon-orange"></i></span>
            <span class="mui-tab-label">发现</span>
          </router-link>
          <router-link class="mui-tab-item-lib" to="/select">
            <span class="mui-icon"><i class="el-icon-shopping-cart-2"></i></span>
            <span class="mui-badge">{{this.$props.total}}</span>
            <span class="mui-tab-label">购物车</span>
          </router-link>
          <router-link class="mui-tab-item-lib" to="/my">
            <span class="mui-icon"><i class="el-icon-user"></i></span>
            <span class="mui-tab-label">我的</span>
          </router-link>
        </nav>
</template>

<script>
import mui from '../lib/mui/js/mui.min.js'
export default {
  props: ['total']
}
</script>

<style scoped>
.mui-bar-tab .mui-tab-item-lib.mui-active {
  color: red;
}

.mui-bar-tab .mui-tab-item-lib {
  display: table-cell;
  overflow: hidden;
  width: 1%;
  height: 50px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #929292;
}

.mui-bar-tab .mui-tab-item-lib .mui-icon {
  top: 3px;
  width: 24px;
  height: 24px;
  padding-top: 0;
  padding-bottom: 0;
}

.mui-bar-tab .mui-tab-item-lib .mui-icon ~ .mui-tab-label {
  font-size: 11px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mui-badge{
  color: white;
  background-color: red;
}

</style>
